﻿
@{

    Layout = null;
}



    <div id="ZDdiv">
        <table id="gridZDList"></table>
        @*<div id="gridZDPager"></div>*@
    </div>





<script>
    //住院号span标签内容改变事件
    //$("#zyh").on('DOMNodeInserted', function () {
    //    ZdListGrid($("#zyh").text());
    //    $("#gridZDList").jqGrid('setGridParam', {
    //        postData: {
    //            zyh: $("#zyh").text(),
    //            //zyh: "01699",
    //        },
    //    }).trigger("reloadGrid");
    //    //$("#gridZDList").closest(".ui-jqgrid-bdiv").css({ "with": $("#form_account").width() + 30 });
    //})

    //$(function () {

    //    //ZdListGrid("01699");

    //})
    
    function ZdListGrid(zyh) {

        var $gridList = $("#gridZDList");
        
        $gridList.dataGrid({
            postData: {
                zyh: zyh,
            },
            url: "/PatientManage/PatientCenter/GetZdGridList",
            height: $(window).height() - 130,
            colModel: [
                { label: "住院号", name: "zyh", width: 60, align: 'center', editor: "text" },
                { label: "诊断编码", name: "zdCode", width: 80, align: 'center', editor: "text" },
                { label: "诊断名称", name: "zdmc", width: 180, align: 'center', editor: "text" },
                { label: "诊断类别", name: "zdlb", width: 70, align: 'center', editor: "text" },
                { label: "诊断时间", name: "zdsj", width: 100, align: 'center', editor: "text" },
                { label: "入院病情", name: "rybq", width: 80, align: 'center', editor: "text" },
                {
                    label: "出院情况", name: "cyqk", width: 60, align: 'center', editor: "text", formatter: function (row, option, data) {
                        if (data.cyqk == "1") {
                            return "治愈";
                        }
                        else if (data.cyqk == "2") {
                            return "好转";
                        }
                        else if (data.cyqk == "3") {
                            return "未愈";
                        }
                        else if (data.cyqk == "4") {
                            return "死亡";
                        }
                        else if (data.cyqk == "5") {
                            return "其他";
                        }
                        else if (data.cyqk == "6") {
                            return "转院";
                        }
                        else
                            return "在院";
                    } },
                { label: "诊断类型", name: "zdlx", width: 80, align: 'center', editor: "text" },
                { label: "诊断来源", name: "zdly", width: 60, align: 'center', editor: "text" },
                { label: "上传", name: "sfsc", width: 30, align: 'center', editor: "text" },
                
            ],
            viewrecords: false,
            //autowidth: true,
        });
        //jQuery("#gridZDList").jqGrid('reloadGrid');
        $("#gridZDList").jqGrid('setGridParam', {
            postData: {
                zyh: $("#zyh").text(),
                //zyh: "01699",
            },
        }).trigger("reloadGrid");
    }


    
</script>

